﻿{extends file="../home.html"}
{block name="title"}{$head_title}{/block}
{block name="css"}
<link rel="stylesheet" style="text/css" href="__PUBLIC__/Css/front/user_glb.css?version={$version}">
{/block}
{block name="content"}
	<!--主内容-->
<div class="edit_addr_cont">
		<!--地址编辑区-->
		 <div class="ed_cont" id="edit_cont">
        <p>
            <label for="name">
                <span class="tit">
                    联系人
                </span>
								<input type="text" id="realname" name="realname" value="{if $opt == 1}{$user_info.realname}{else}{$user_address_info.realname}{/if}" placeholder="姓名">
            </label>
        </p>
        <p>
            <label for="mobile">
                <span class="tit">
                    手机号码
                </span>
                <input type="tel" id="mobile" name="mobile" value="{if $opt == 1}{$user_info.mobile}{else}{$user_address_info.mobile}{/if}" placeholder="手机号码">
            </label>
        </p>
      
       

		<p>
          <label for="provinceId" class="ed_select">
              <span class="tit">
                  省份
              </span>
              <select id="province_id" name="province_id">
                  <option value="0"> 选择省份 </option>	
                  {foreach from=$province_list item=province}			
									<option value="{$province.province_id}" {if $province.province_id == $user_address_info.province_id}selected{/if}>{$province.province_name}</option>				
              		{/foreach}
              </select>
          </label>
      </p>
      <p>
          <label for="cityId" class="ed_select">
              <span class="tit">
                  市
              </span>
              <select name="city_id" id="city_id">
                  <option value="0"> 选择城市 </option>
              </select>
          </label>
      </p>
      <p id="areaSelP" class="ed_area">
          <label for="areaId" class="ed_select">
              <span class="tit">
                  区/县
              </span>
              <select name="area_id" id="area_id">
                  <option value=""> 选择县/区 </option>
              </select>
          </label>
      </p>

	  <p>
            <label>   
            	<span class="tit">
                    
                </span>      
				<input id="detail_address" name="address" value="{$user_address_info.address}" type="text" placeholder="请填写详细地址">
            </label>
        </p>


        <p class="action" style="display:none;">
        		<input type="hidden" id="pre_province_id" value="{$user_address_info.province_id}">
						<input type="hidden" id="pre_city_id" value="{$user_address_info.city_id}">
						<input type="hidden" id="pre_area_id" value="{$user_address_info.area_id}">
						<input type="hidden" id="address_id" value="{$user_address_info.user_address_id}">
						<input type="hidden" id="building_id" value="{$user_address_info.building_id}">
        </p>
     </div>

     <div class="submit_btn">
    	<a class="submit" id="editBtn" onclick="save_address()">确认</a>	
   	 </div>
</div>
{include file="../address_search_common.html"}

{/block}
{block name="js"}
<!--
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=8904f42a99f576207303619b99e50d52"></script>
-->
<script src="__JS__/front/bbc.districtdata.js?version={$version}"></script>
<script>
var jump = '{$jump}';
var opt = {$opt};
//var lon = '{$lon}';
//var lat = '{$lat}';
//get_lon_lat();
//alert(lon + ',' + lat);
{literal}
</script>  
{/literal}
{/block}
